home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / pc / explorer / ex_funct.dxr / 00001.ls next >
Encoding:
Text File  |  1997-07-22  |  1.7 KB  |  60 lines

  1. on startMovie
  2.   global a, b, c
  3.   set the cursor of sprite 20 to [319, 320]
  4.   set the cursor of sprite 21 to [319, 320]
  5.   set the cursor of sprite 22 to [319, 320]
  6.   set the randomSeed to the ticks
  7.   cursor(-1)
  8.   set the keyDownScript to "printPass"
  9.   set the keyUpScript to "numsOnly"
  10.   set the hilite of cast "Degrees" to 1
  11.   put "0" into field "X"
  12.   put "0" into field "Y"
  13.   put "0" into field "R"
  14.   put "0" into field "Theta"
  15.   put "0" into field "Answer1"
  16.   put "0" into field "Answer2"
  17.   put "0" into field "Cos"
  18.   put "0" into field "Sin"
  19.   set the textSize of field "X" to 32
  20.   set the textSize of field "Y" to 32
  21.   set the textSize of field "R" to 32
  22.   set the textSize of field "Theta" to 32
  23.   set the textSize of field "Answer1" to 32
  24.   set the textSize of field "Answer2" to 32
  25.   set the textSize of field "Cos" to 32
  26.   set the textSize of field "Sin" to 32
  27.   set the textStyle of field "X" to "bold"
  28.   set the textStyle of field "Y" to "bold"
  29.   set the textStyle of field "R" to "bold"
  30.   set the textStyle of field "Theta" to "bold"
  31.   set the textStyle of field "Answer1" to "bold"
  32.   set the textStyle of field "Answer2" to "bold"
  33.   set the textStyle of field "Cos" to "bold"
  34.   set the textStyle of field "Sin" to "bold"
  35. end
  36.  
  37. on stopMovie
  38.   cursor(-1)
  39.   set the cursor of sprite 20 to 0
  40.   set the cursor of sprite 21 to 0
  41.   put 45 into field "Answer1"
  42.   put 45 into field "Answer2"
  43. end
  44.  
  45. on numsOnly
  46.   if (the key = RETURN) or (the key = ENTER) or (the key = TAB) or (the key = "-") or (the keyCode = 76) then
  47.     exit
  48.   end if
  49.   if (the key >= "0") and (the key <= "9") then
  50.     exit
  51.   end if
  52.   if the key = "." then
  53.     exit
  54.   end if
  55.   if the key = BACKSPACE then
  56.     exit
  57.   end if
  58.   dontPassEvent()
  59. end
  60.